package com.sen.patterns.creational.factory.ex4;

import java.awt.Point;

/**
 * 绘画类，使用不同的构造函数创建对象。这是另一种方式来实现工厂模式
 * @author sen
 */
public class Painting {
	Painting(Point a, Point b) {
		new Line(a, b); // draw a line
	}

	Painting(Point a, int w, int h) {
		new Square(a, w, h); // draw a square
	}

	Painting(Point a, int r) {
		new Circle(a, r); // draw a circle
	}
	
}
